package com.netease.spring.ch3;

import com.netease.spring.ch2.Performer;
import com.netease.spring.exceptions.PerformanceException;

public class Magician implements Performer {

    private MagicBox magicBox;

    private String magicWords;

    /**
     * @param magicBox
     *            the magicBox to set
     */
    public void setMagicBox(MagicBox magicBox) {
        this.magicBox = magicBox;
    }

    /**
     * @param magicWords
     *            the magicWords to set
     */
    public void setMagicWords(String magicWords) {
        this.magicWords = magicWords;
    }

    @Override
    public void perform() throws PerformanceException {
        System.out.println(magicWords);
        System.out.println("The magic box contains");
        System.out.println(magicBox.getContents());
    }

}
